package com.lin.dao;

import com.lin.pojo.Order;
import com.lin.pojo.WaresOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderDao {
    void insertOrder(Order order);

    void insertWaresOrder(WaresOrder waresOrder);

    List<Order> getOrder(@Param("date1") String s, @Param("date2") String s1,
                         @Param("id") String searchOrderId, @Param("storeId") int storeId,
                         @Param("type") int type);


    Order getOrderById(@Param("id") String id, @Param("storeId") int storeId);

    List<WaresOrder> getOrderWaresByOrderId(@Param("id") String id,
                                            @Param("storeId") int storeId);


    List<WaresOrder> getOrderWaresByType(@Param("type") int type,
                                         @Param("startDate") String searchDate,
                                         @Param("endDate") String endDate,
                                         @Param("waresId") String waresId,
                                         @Param("storeId") int storeId);

    List<WaresOrder> getTotalPriceByDate(@Param("type") int type,
                                         @Param("startDate") String searchDate,
                                         @Param("endDate") String endDate,
                                         @Param("storeId") int storeId);

    double getCostByCategoryId(@Param("category") int categoryId,
                               @Param("type") int type,
                               @Param("startDate") String searchDate,
                               @Param("endDate") String endDate,
                               @Param("storeId") int storeId);


    WaresOrder getWaresById(@Param("waresId") String id,
                            @Param("type") int type,
                            @Param("startDate") String searchDate,
                            @Param("endDate") String endDate,
                            @Param("storeId") Integer storeId);

    List<WaresOrder> getReportDetails(@Param("type") int type,
                                      @Param("startDate") String searchDate,
                                      @Param("endDate") String endDate,
                                      @Param("waresId") String id,
                                      @Param("storeId") Integer storeId);
}
